<template>
	<view class="project-component">
		<!-- 项目介绍  start -->
		
		<view class="resume-wrap" v-for="(item,index) in list" :key="index">
		  <view class="resume-box" >
			  <view class="flex-c-e" v-if="index>0">
			  	<image src="../static/image/icon_delete.png" mode="aspectFit" class="det " @click="deleteList(index)"></image>
			  </view>
			<block v-for="(val,j) in item" :key="j">
				
				<uni-forms :modelValue="val">
					<uni-forms-item :label="val.label" >
						<uni-easyinput :type="val.type" maxlength="-1" v-model="val.project" :placeholder="val.placeholder" />
					</uni-forms-item>
				</uni-forms>
			</block>	
		 </view>
		</view>
		<view class="resume-add flex-c-c" @click="addList">
		  <view>工作经历</view>
		  <uni-icons  type="plus" size="30"></uni-icons>
		</view>
		</view>
		
		<!-- 项目介绍  end -->
		
	</view>
</template>

<script>

	export default{
		name:'projectComponent',
		data(){
			return{
				list:this.$store.state.threeList,
			}
		},
		methods:{
			//添加
			addList(){
				// this.list.push(oneList)
				this.$store.commit('addList');
			},
			deleteList(k){
				console.log(k)
				// this.list.splice(k,1)
				this.$store.commit('deleteList',k);
			}
		}
	}
</script>

<style lang="scss">
	.project-component{
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		padding: 40upx;
		background-color: #EBEEF5;
		overflow: auto;
		.resume-wrap{
			width: 100%;
			box-sizing: border-box;
			padding: 30upx 20upx 20upx; 
			border-radius: 20upx;
			box-shadow: 0 0 20upx #000;
			background-color: #fff;
			margin-bottom: 38upx;
		}
		.resume-add{
			width: 100%;
			height: 60upx;
			margin: 30upx auto;
			border-radius: 20upx;
			background-color: #fff;
		}
		.det{
			width: 40upx;
			height: 40upx;
			margin: 20upx 0;
		}
		
	}
</style>
